package com.kgajowy.objects;

import edu.pjwstk.jps.datastore.IOID;

public class DBID implements IOID, Comparable<DBID> {

    private int id;
    /**
     * 
     */
    private static final long serialVersionUID = 1331866578471434742L;

    public DBID(int i){
        this.id = i;
    }
    
    public int getOID() {
        return this.id;
    }

    public boolean equals(Object obj){
        return (this.hashCode() == obj.hashCode());
    }

    @Override
    public int compareTo(DBID o) {
        Integer i1 = o.getOID();
        Integer i2 = this.getOID();
        return i2.compareTo(i1);
    }
    
    /*
    public int hashCode() {
        return this.hashCode();
    }
    */
    
    
}
